Return to start page

Compute cumulative inner product of range Returns the result of accumulating initialValue with the inner products of the pairs formed by the elements of two ranges starting at position0 and position1. The two default operations (to add up the result of multiplying the pairs) have * to be overridden by parameters binaryOperation0 and binaryOperation1. The result of accumulating initialValue and the products of all the pairs of elements in the ranges starting at position0 and position1. C++ template example: template T inner_product ( InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, T init ) { while (first1!=last1) init = init + (*first1++)*(*first2++); // or: init=binary_op1(init,binary_op2(*first1++,*first2++)) // for the binary_op's version return init; }

Brief Description

-

Source File

Core/General/Struct Vector.j

Object

lastIndex

Authors

-

See Objects

-

Todos

-